// ===============================================
// app_service
//
// Create by Will on 2024/12/20 01:46
// Copyright @flutter_base.All rights reserved.
// ===============================================

import 'package:flutter/cupertino.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

final appLocalizationsProvider =
    StateNotifierProvider<LocaleNotifier, Locale>((ref) {
  return LocaleNotifier();
});

class LocaleNotifier extends StateNotifier<Locale> {
  LocaleNotifier() : super(WidgetsBinding.instance.platformDispatcher.locale);

  void setLocale(Locale locale) {
    state = locale;
  }
}
